<template>
  <div class="app-portal-body">
    <div class="app-portal-menucontent" v-if="app">
      <SvcTree
        :app-id="app.group_id"
        @select="handleSelectSvc"
        style="width:100%;height:100%;"
      />
    </div>
    <div class="app-portal-content">
      <div class="app-portal-cnt-bd" v-if="currentData">
        <SvcApis :current-data="currentData"></SvcApis>
      </div>
    </div>
  </div>
</template>

<script setup>
import SvcTree from '../basic/services/svc-tree.vue';
import SvcApis from '../basic/services/svc-apis.vue';
import {ref} from "vue";

const props = defineProps({
  app: Object,
})

const currentData = ref(null);

const handleSelectSvc = (data) => {
  currentData.value = data;
}
</script>
